home *** CD-ROM | disk | FTP | other *** search
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="text"/>
- <xsl:template match="/">
- <xsl:for-each select="root/line/word[not(@type = 'end')]">
- <xsl:sort
- select="translate(concat(.,self::*[contains(.,'-')]
- /following::word[@type='end']), '-', '')"/>
- <xsl:choose>
- <xsl:when test="contains(., '-')">
- <xsl:value-of select="substring-before(., '-')"/>
- <xsl:value-of select="following::word[@type='end']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="position() != last()">
- <xsl:text>
</xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- </xsl:stylesheet>
-
-
-